package datasource

import (
	"gitee.com/kristas/booting-go/framework/core/bean"
)

const PropertiesPath = "application.datasource"

type DB interface{}

type DataSource interface {
	bean.Bean
	DB() DB
}

type DataSourceDriver interface {
	bean.Bean
	Type() string
	Driver() string
	Open(properties *DataSourceProperties) (DB, error)
}

type BeanDBAware interface {
	bean.Bean
	DataSource() string
	SetDB(db DB)
}
